package com.example.design.patterns.冰河.创建型模式.单例;

/**
 * 代码六：饿汉模式-静态代码块，单例实例在类装载的时候进行创建，线程安全
 */
public class SingletonExample6 {
    private static SingletonExample6 instance = null;

    ;

    static {
        instance = new SingletonExample6();
    }

    private SingletonExample6() {
    }

    private static SingletonExample6 getInstance() {
        return instance;
    }
}
